package cn.cdeden.aiqa.service;

import cn.cdeden.aiqa.domain.bo.*;
import cn.cdeden.aiqa.domain.vo.*;
import org.springframework.web.multipart.MultipartFile;
import reactor.core.publisher.Flux;

public interface DifyService {

    DifyKnowledgeBaseVo datasets(Integer page, Integer limit);

    DifyKnowledgeBaseCreateVo create(DifyKnowledgeBaseBo bo);

    Boolean del(String dataSetId);

    DifyKnowledgeFileVo fileList(String dataSetId, String keyword, Integer page, Integer limit);

    DifyCreateByTextVo createByText(String datasetId, DifyCreateByTextBo bo);

//    DifyCreateByFileVo createByFile(MultipartFile file, String datasetId, DifyCreateByFileBo bo);

    DifyCreateByFileVo createByFile(MultipartFile file, String fileName, String datasetId, DifyCreateByFileBo bo);

    DifyCreateByFileVo createByFile(String storageId, String filName, String datasetId, DifyCreateByFileBo bo);

    DifyUpdateByTextVo updateByText(String datasetId, String documentId, DifyUpdateByTextBo bo);

    DifyUpdateByFileVo updateByFile(MultipartFile file, String datasetId, String documentId, DifyUpdateByFileBo bo);

    DifyIndexingStatusVo indexingStatus(String dataSetId, String batch);

    Boolean delFile(String datasetId, String documentId);

    DifySegmentsVo segments(String datasetId, String documentId, DifySegmentsBo bo);

    DifySegmentsVo segments(String datasetId, String documentId, String keyword, String status);

    Boolean segments(String datasetId, String documentId, String segmentId);

    DifySegmentsVo segments(String datasetId, String documentId, String segmentId, DifyUpdateSegmentsBo bo);

    DifyRetrieveVo retrieve(String datasetId, DifyRetrieveBo bo);

    Flux<String> chat(DifyChatBo bo);
}
